<div class="bjui-pageHeader">
    <div class="pull-right">
        <!-- <button class="btn-default" data-icon="plus" title="添加订单" data-toggle="tooltip" data-placement="left" onclick="createDialog('{:U("Forms/order")}', '添加订单', 'order', {width:800, height:500} )"></button> -->
        <a type="button" class="btn btn-default" href="{:U('Index/save')}" data-toggle="doexportchecked" data-group="ids" data-confirm-msg="确定要导出选中项吗？" data-icon="cloud-download"></a>
        <button class="btn-default" data-icon="refresh" onclick="$.CurrentNavtab.navtab('refresh')"></button>
    </div>
    <form id="pagerForm" data-toggle="ajaxsearch" data-loadingmask="true" action="{:U('index')}" method="post">
        <input type="hidden" name="pageSize" value="{:I('param.pageSize')}" />
        <input type="hidden" name="pageCurrent" value="{:I('param.pageCurrent')}" />
        <input type="hidden" name="orderField" value="{:I('param.orderField')}" />
        <input type="hidden" name="orderDirection" value="{:I('param.orderDirection')}" />
        <div class="bjui-searchBar">
            <label>收货人:</label>
            <input type="text" name="name" value="{:I('name')}"class="w100" />
            <label>订单号:</label>
            <input type="text" name="order_no" value="{:I('order_no')}" />
            <label>区间:</label>
            <input type="text" name="start_time" value="{:I('start_time')}" class="dateStart"  data-toggle="datepicker" style="width: 150px;" />
            -
            <input type="text" name="end_time" value="{:I('end_time')}" class="dateEnd" data-toggle="datepicker"  style="width: 150px;" />
            <button type="button" class="showMoreSearch" data-toggle="moresearch" data-name="custom"><i class="fa fa-angle-double-down"></i></button>
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询 </a>
        </div>
        <div class="bjui-moreSearch">
            <select name="order_status" data-toggle="selectpicker">
            <option value="">订单状态</option>
            <option value="0" <if condition="I('order_status') eq '0'">selected</if>>未付款</option>
            <option value="1" <if condition="I('order_status') eq '1'">selected</if>>已付款 待发货</option>
            <option value="2" <if condition="I('order_status') eq '2'">selected</if>>部分发货</option>
            <option value="3" <if condition="I('order_status') eq '3'">selected</if>>已发货</option>
            <option value="4" <if condition="I('order_status') eq '4'">selected</if>>已完成 待评价</option>
            <option value="5" <if condition="I('order_status') eq '5'">selected</if>>退款审核中</option>
            <option value="6" <if condition="I('order_status') eq '6'">selected</if>>已成功退款</option>
            <option value="8" <if condition="I('order_status') eq '8'">selected</if>>已评价</option>
            </select>
            <select name="pay_type" data-toggle="selectpicker">
            <option value="">支付方式</option>
            <option value="0" <if condition="I('pay_type') eq '0'">selected</if>>货到付款</option>
            <option value="1" <if condition="I('pay_type') eq '1'">selected</if>>微信支付</option>
            <option value="2" <if condition="I('pay_type') eq '2'">selected</if>>支付宝支付</option>
            <option value="3" <if condition="I('pay_type') eq '3'">selected</if>>银联支付</option>
            <option value="4" <if condition="I('pay_type') eq '4'">selected</if>>财付通支付</option>
            </select>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
        <!--
            data-order-field="数据库名字"  排序
        -->
        <tr>
            <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            <th>订单号</th>
            <th>下单会员</th>
            <th>商品总金额</th>
            <th>实付金额</th>
            <th data-order-field="ostatus">订单状态</th>
           <!--  <th data-order-field="zstatus">支付状态</th>
            <th data-order-field="fstatus">发货状态</th> -->
            <th data-order-field="typestatus">支付方式</th>
            <th data-order-field="ordertime">下单时间</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
        <tr>
            <th width="26"><input type="checkbox" value="1" class="checkboxCtrl" name="ids" data-toggle="icheck"></th>
            <td>{$vo.order_no}</td>
            <td>{$vo.user_mobile}</td>
            <td>{$vo.payable_amount}</td>
            <td>{$vo.order_amount}</td>
            <td>{:order_status($vo['order_status'])}</td>
           <!--  <td>已支付</td>
            <td>未发货</td> -->
            <td>{:order_pay_status($vo['pay_type'])}</td>
            <td>{$vo.create_time}</td>
            <td>
                <button type="button" class="btn-blue" onclick="createDialog('{:U("Order/msg",array("id"=>$vo["id"]))}', '订单详细', 'ordermsg', {width:800, height:500})">详</button>
                <if condition="$vo.order_status eq '0'">
                <a href="{:U('Order/del_order',array('id'=>$vo['id']))}" class="btn btn-red" data-type="get" data-toggle="doajax" data-confirm-msg="你确定要删除该订单吗？" >删</a>
                </if>
            </td>
        </tr>
        </volist>
        </tbody>
    </table>
</div>
<include file="Common/footer" ftype="page" />